﻿package plugin.duanzao.view
{
    import cmd.*;
    import com.core.*;
    import com.sh.game.display.*;
    import com.sh.game.global.*;
    import com.sh.game.util.*;
    import flash.events.*;
    import flash.geom.*;
    import manager.*;
    import morn.core.components.*;
    import morn.core.handlers.*;
    import uiresource.*;
    import view.mornExtends.*;
    import view.uilt.*;

    public class JianDingView extends JianDingUI
    {
        private var _movieClip:XMLMovieClip;
        private var onArr:Array;
        private var arr:Array;
        public var _armArray:Array;
        public var _armOnArray:Array;
        private var objValue:Object = null;
        private var appraisalArr:Array;
        private var appraisalArr1:Array;
        private var appArr:Array;
        private var cfgJianDing:Array;
        private var _storeids:Array;
        private var _storetids:Array;
        private var _confitem:Object;
        private var armid:int;
        private var lock:uint = 0;
        private var lockArr:BooleanArray;
        private var armjd:Object = null;
        private var jiandingArr:Array;
        private var delayshow:int = 0;
        private var cfgitem:Object;
        private var PageNum:int = 6;
        private var jdPage:int = 1;
        private var BeiBaoPage:int = 0;
        private var ChuanPage:int = 0;
        private var needCount:int = 0;
        private var needJinbi:int = 0;
        private var _mc:XMLMovieClip;
        private var _xml1:XML;
        public static const xmlEff:Class = JianDingView_xmlEff;
        public static const suoXML:Class = JianDingView_suoXML;

        public function JianDingView()
        {
            this._armArray = [];
            this._armOnArray = [];
            this.cfgJianDing = ConfigDictionary.data.jianding;
            this._storeids = [276, 24];
            this._storetids = [2212257, 2207286];
            this.jiandingArr = [0, 20, 20, 15, 12, 12, 5, 5, 5, 5, 1000];
            this.cfgitem = ConfigDictionary.data.item;
            return;
        }// end function

        override protected function initializeView() : void
        {
            super.initializeView();
            jdtx1.isHtml = true;
            jdftx1.isHtml = true;
            this._xml1 = new XML(new suoXML());
            var _loc_1:String = "assets/images/mainui/suo.swf";
            App.mloader3.loadSWF(Config.getUrl(_loc_1), 1, new Handler(this.initEvent));
            shopLabel.addEventListener(MouseEvent.CLICK, this.onLabelClicked);
            zbhsLabel.addEventListener(MouseEvent.CLICK, this.onLabelClicked);
            return;
        }// end function

        private function onLabelClicked(event:MouseEvent) : void
        {
            if (event.currentTarget == shopLabel)
            {
                PluginManager.instance.openPlugin("store", shopLabel.localToGlobal(new Point(0, 0)), 1);
            }
            else if (event.currentTarget == zbhsLabel)
            {
                PluginManager.instance.openPlugin("zbhsy", zbhsLabel.localToGlobal(new Point(0, 0)), 4);
            }
            return;
        }// end function

        private function Loaded(param1) : void
        {
            var _loc_2:* = new XML(new xmlEff());
            this._movieClip = new XMLMovieClip("png.movie.jianding", _loc_2);
            this._movieClip.mouseEnabled = false;
            this._movieClip.mouseChildren = false;
            this.addChild(this._movieClip);
            this._movieClip.visible = false;
            return;
        }// end function

        private function initEvent(param1:Object) : void
        {
            jdtab.selectHandler = new Handler(this.tabHandler);
            mlist.selectHandler = new Handler(this.listSelectHandler);
            mlist.renderHandler = new Handler(this.listlistRender);
            jditem.addEventListener(MouseEvent.CLICK, this.jditemClickHandler);
            chejd2.clickHandler = new Handler(this.choseHandler2);
            chejd.clickHandler = new Handler(this.choseHandler2);
            btn_jd.addEventListener(MouseEvent.CLICK, this.jdHandler);
            btn_jdsure.addEventListener(MouseEvent.CLICK, this.sureHandler);
            btn_jdcancel.addEventListener(MouseEvent.CLICK, this.cancelHandler);
            leftBtn.addEventListener(MouseEvent.CLICK, this.jdLeftHandler);
            rightBtn.addEventListener(MouseEvent.CLICK, this.jdRightHandler);
            return;
        }// end function

        private function tabHandler(param1:int) : void
        {
            this.jdPage = 1;
            selectBox.visible = false;
            selectBox.alpha = 0;
            rightBtn.disabled = false;
            if (jdtab.selectedIndex == 1)
            {
                mlist.array = this.arr;
                pageLabel.text = String(this.jdPage) + "/" + String(this.BeiBaoPage);
            }
            else
            {
                mlist.array = this.onArr;
                pageLabel.text = String(this.jdPage) + "/" + String(this.ChuanPage);
            }
            return;
        }// end function

        private function jdLeftHandler(event:MouseEvent) : void
        {
            var _loc_2:String = this;
            var _loc_3:* = this.jdPage - 1;
            _loc_2.jdPage = _loc_3;
            selectBox.visible = false;
            selectBox.alpha = 0;
            rightBtn.disabled = false;
            if (this.jdPage < 1)
            {
                this.jdPage = 1;
            }
            else
            {
                selectBox.visible = false;
            }
            this.changeData();
            return;
        }// end function

        private function jdRightHandler(event:MouseEvent) : void
        {
            var _loc_2:String = this;
            var _loc_3:* = this.jdPage + 1;
            _loc_2.jdPage = _loc_3;
            selectBox.visible = false;
            selectBox.alpha = 0;
            if (jdtab.selectedIndex == 0)
            {
                if (this.jdPage >= this.ChuanPage)
                {
                    this.jdPage = this.ChuanPage;
                    rightBtn.disabled = true;
                }
                else
                {
                    rightBtn.disabled = false;
                }
            }
            else if (this.jdPage >= this.BeiBaoPage)
            {
                this.jdPage = this.BeiBaoPage;
                rightBtn.disabled = true;
            }
            else
            {
                rightBtn.disabled = false;
            }
            this.changeData();
            return;
        }// end function

        private function changeData(param1:Object = null) : void
        {
            var _loc_2:Object = null;
            var _loc_3:Object = null;
            var _loc_4:Array = null;
            var _loc_5:Array = null;
            var _loc_6:int = 0;
            var _loc_8:Object = null;
            var _loc_9:Object = null;
            this.arr = [];
            this.onArr = [];
            for each (_loc_2 in this._armArray)
            {
                
                if (param1 != null)
                {
                    if (_loc_2.id == param1.id)
                    {
                        continue;
                    }
                }
                for each (_loc_8 in this.cfgJianDing)
                {
                    
                    if (_loc_2.reinlv == int(_loc_8.itemlevel))
                    {
                        this.arr.push(_loc_2);
                    }
                }
            }
            for each (_loc_3 in this._armOnArray)
            {
                
                if (param1 != null)
                {
                    if (_loc_3.id == param1.id)
                    {
                        continue;
                    }
                }
                for each (_loc_9 in this.cfgJianDing)
                {
                    
                    if (_loc_3.reinlv == int(_loc_9.itemlevel))
                    {
                        this.onArr.push(_loc_3);
                    }
                }
            }
            _loc_4 = [];
            _loc_5 = [];
            _loc_6 = 0;
            while (_loc_6 < this.arr.length)
            {
                
                if (int(_loc_6 / this.PageNum) == (this.jdPage - 1))
                {
                    _loc_5.push(this.arr[_loc_6]);
                }
                _loc_6++;
            }
            this.BeiBaoPage = Math.ceil(this.arr.length / 6) == 0 ? (1) : (Math.ceil(this.arr.length / 6));
            var _loc_7:int = 0;
            while (_loc_7 < this.onArr.length)
            {
                
                if (int(_loc_7 / this.PageNum) == (this.jdPage - 1))
                {
                    _loc_4.push(this.onArr[_loc_7]);
                }
                _loc_7++;
            }
            this.ChuanPage = Math.ceil(this.onArr.length / 6) == 0 ? (1) : (Math.ceil(this.onArr.length / 6));
            if (jdtab.selectedIndex == 0)
            {
                pageLabel.text = String(this.jdPage) + "/" + String(this.ChuanPage);
            }
            else
            {
                pageLabel.text = String(this.jdPage) + "/" + String(this.BeiBaoPage);
            }
            if (jdtab.selectedIndex == 1)
            {
                this.arr.sortOn("cls");
            }
            else
            {
                this.onArr.sortOn("cls");
            }
            if (jdtab.selectedIndex == 1)
            {
                mlist.array = _loc_5;
            }
            else
            {
                mlist.array = _loc_4;
            }
            return;
        }// end function

        private function listlistRender(param1:Component, param2:int) : void
        {
            var _loc_3:Object = null;
            var _loc_4:FlashItem = null;
            var _loc_5:Label = null;
            if (param2 < mlist.length)
            {
                _loc_3 = mlist.array[param2];
                _loc_4 = param1.getChildByName("fi") as FlashItem;
                _loc_4.data = _loc_3;
                _loc_5 = param1.getChildByName("nameLabel") as Label;
                _loc_5.text = mlist.array[param2].name;
            }
            return;
        }// end function

        public function tweenComp(param1:int) : void
        {
            selectBox.y = param1;
            selectBox.alpha = 1;
            return;
        }// end function

        private function listSelectHandler(param1:int) : void
        {
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_5:Object = null;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_11:Array = null;
            if (mlist.selectedItem == null)
            {
                return;
            }
            jditem.data = mlist.selectedItem;
            this.armid = mlist.selectedItem.id;
            this.objValue = mlist.selectedItem;
            jditem.visible = true;
            selectBox.visible = true;
            selectBox.alpha = 0;
            this.tweenComp(38 + mlist.selectedIndex * (50 + 7));
            var _loc_9:* = (this.cfgJianDing[this.objValue.level].cost as String).split("#");
            var _loc_10:* = this.cfgitem[_loc_9[0]].name;
            if (chejd2.selected)
            {
                this.needJinbi = this.cfgJianDing[this.objValue.level].money * 2;
                this.needCount = int(_loc_9[1]) * 2;
            }
            else
            {
                this.needJinbi = this.cfgJianDing[this.objValue.level].money;
                this.needCount = int(_loc_9[1]);
            }
            this.choseHandler2();
            this.lock = 0;
            this.appraisalArr = [{}, {name:MColor.getHMTL("70级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("75级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("80级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("85级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("90级传说装备可激活本属性", 2), maxcount:"", count:""}];
            this.lockArr = new BooleanArray();
            if (mlist.selectedItem.appraisal)
            {
                _loc_11 = mlist.selectedItem.appraisal;
                _loc_3 = 0;
                while (_loc_3 < _loc_11.length)
                {
                    
                    _loc_5 = new Object();
                    _loc_5.index = _loc_3;
                    _loc_6 = _loc_11[_loc_3] >> 16 & 15;
                    _loc_4 = _loc_11[_loc_3] & 65535;
                    _loc_5.name = this.getName(_loc_6);
                    _loc_5.lock = false;
                    _loc_5.type = _loc_6;
                    _loc_5.count = _loc_4;
                    this.lockArr.setValue(_loc_3, false);
                    _loc_2 = this.objValue.level;
                    _loc_7 = int(this.cfgJianDing[_loc_2].value / this.jiandingArr[_loc_6]);
                    _loc_5.num = _loc_4 / _loc_7;
                    _loc_8 = _loc_11[_loc_3] >> 20;
                    _loc_5.maxcount = _loc_8;
                    this.appraisalArr[_loc_3] = _loc_5;
                    _loc_3++;
                }
            }
            else
            {
                _loc_2 = this.objValue.level;
                _loc_4 = int(this.cfgJianDing[_loc_2].count);
                _loc_3 = 0;
                while (_loc_3 < _loc_4)
                {
                    
                    _loc_5 = new Object();
                    _loc_5.index = _loc_3;
                    _loc_5.name = "";
                    this.appraisalArr[_loc_3] = _loc_5;
                    _loc_3++;
                }
            }
            nlist.array = this.appraisalArr;
            nlist.renderHandler = new Handler(this.blistRender);
            nlist.visible = true;
            this.changeData(mlist.selectedItem);
            this.cancelHandler(null);
            if (this.armjd)
            {
                if (this.armjd.level == mlist.selectedItem.level)
                {
                    _loc_11 = this.armjd.app;
                    this.appraisalArr1 = [{}, {name:MColor.getHMTL("70级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("75级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("80级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("85级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("90级传说装备可激活本属性", 2), maxcount:"", count:""}];
                    _loc_3 = 0;
                    while (_loc_3 < _loc_11.length)
                    {
                        
                        _loc_5 = new Object();
                        _loc_5.index = _loc_3;
                        _loc_6 = _loc_11[_loc_3] >> 16 & 15;
                        _loc_4 = _loc_11[_loc_3] & 65535;
                        _loc_5.name = this.getName(_loc_6);
                        _loc_5.lock = false;
                        _loc_5.type = _loc_6;
                        _loc_5.count = _loc_4;
                        _loc_2 = this.objValue.level;
                        _loc_7 = int(this.cfgJianDing[_loc_2].value / this.jiandingArr[_loc_6]);
                        _loc_5.num = _loc_4 / _loc_7;
                        _loc_8 = _loc_11[_loc_3] >> 20;
                        _loc_5.maxcount = _loc_8;
                        this.appraisalArr1[_loc_3] = _loc_5;
                        _loc_3++;
                    }
                    slist.array = this.appraisalArr1;
                    slist.renderHandler = new Handler(this.slistRender);
                    slist.visible = true;
                    btn_jd.visible = false;
                    btn_jdsure.visible = true;
                    btn_jdcancel.visible = true;
                }
            }
            mlist.selectedIndex = -1;
            return;
        }// end function

        private function choseHandler2() : void
        {
            this.showJdfText(this.needCount, this.needJinbi);
            return;
        }// end function

        public function jditemClickHandler(event:MouseEvent) : void
        {
            this.objValue = null;
            jditem.data = null;
            jditem.visible = false;
            slist.visible = false;
            nlist.visible = false;
            chejd2.selected = false;
            jdtx1.text = "消耗金币：0";
            jdftx1.text = "消耗鉴定石：0";
            jdftx3.text = "消耗元宝：0";
            btn_jdsure.visible = false;
            btn_jd.visible = false;
            btn_jdcancel.visible = false;
            this.armid = 0;
            this.lock = 0;
            this.appraisalArr = [];
            this.changeData();
            ModelProxy.change("tips", "state", "close");
            var _loc_2:int = 0;
            this.needJinbi = 0;
            this.needCount = _loc_2;
            var _loc_2:Boolean = false;
            chejd2.selected = false;
            chejd.selected = _loc_2;
            this.armjd = null;
            return;
        }// end function

        private function sureHandler(event:MouseEvent) : void
        {
            var _loc_2:int = 0;
            var _loc_3:Object = null;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            btn_jdsure.visible = false;
            btn_jd.visible = true;
            btn_jdcancel.visible = false;
            slist.visible = false;
            this.objValue.appraisal = this.appArr;
            if (this.appArr)
            {
                this.appraisalArr = [{}, {name:MColor.getHMTL("70级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("75级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("80级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("85级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("90级传说装备可激活本属性", 2), maxcount:"", count:""}];
                this.lockArr = new BooleanArray();
                if (this.lock != 0)
                {
                    this.lockArr.setAll(this.lock);
                }
                _loc_2 = 0;
                while (_loc_2 < this.appArr.length)
                {
                    
                    _loc_3 = new Object();
                    _loc_3.index = _loc_2;
                    _loc_4 = this.appArr[_loc_2] >> 16 & 15;
                    _loc_5 = this.appArr[_loc_2] & 65535;
                    _loc_3.name = this.getName(_loc_4);
                    if (this.lock != 0)
                    {
                        _loc_3.lock = this.lockArr.getValue(_loc_2);
                    }
                    else
                    {
                        _loc_3.lock = false;
                    }
                    _loc_3.type = _loc_4;
                    _loc_3.count = _loc_5;
                    this.lockArr.setValue(_loc_2, _loc_3.lock);
                    _loc_6 = this.objValue.level;
                    _loc_7 = int(this.cfgJianDing[_loc_6].value / this.jiandingArr[_loc_4]);
                    _loc_3.num = _loc_5 / _loc_7;
                    _loc_8 = this.appArr[_loc_2] >> 20;
                    _loc_3.maxcount = _loc_8;
                    this.appraisalArr[_loc_2] = _loc_3;
                    _loc_2++;
                }
                nlist.array = this.appraisalArr;
                nlist.renderHandler = new Handler(this.blistRender);
                nlist.visible = true;
            }
            if (this._movieClip)
            {
                this._movieClip.visible = true;
                this._movieClip.playFromTo(-1, 13, new Handler(this.clipCompleteHandler));
            }
            PluginManager.instance.sendToServer("qianghua", CMDQiangHua.AppraisalSure, null);
            this.armjd = null;
            return;
        }// end function

        protected function clipCompleteHandler() : void
        {
            if (this._movieClip)
            {
                this._movieClip.visible = false;
            }
            return;
        }// end function

        private function cancelHandler(event:MouseEvent) : void
        {
            btn_jdsure.visible = false;
            btn_jd.visible = true;
            btn_jdcancel.visible = false;
            slist.visible = false;
            this.armjd = null;
            return;
        }// end function

        private function jdHandler(event:MouseEvent) : void
        {
            if (this.lockArr)
            {
                this.lock = this.lockArr.getKey();
            }
            var _loc_2:int = 1;
            if (chejd2.selected)
            {
                _loc_2 = 1;
            }
            else
            {
                _loc_2 = 2;
            }
            PluginManager.instance.sendToServer("qianghua", CMDQiangHua.Appraisal, {armid:this.armid, flag:chejd.selected, type:_loc_2, lock:this.lock});
            return;
        }// end function

        public function jianDing(param1:Object) : void
        {
            var _loc_2:int = 0;
            var _loc_3:Object = null;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            this.armjd = param1;
            if (param1 == null || this.objValue == null)
            {
                return;
            }
            if (this.armjd.app)
            {
                this.appArr = this.armjd.app;
                this.appraisalArr1 = [{}, {name:MColor.getHMTL("70级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("75级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("80级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("85级传说装备可激活本属性", 2), maxcount:"", count:""}, {name:MColor.getHMTL("90级传说装备可激活本属性", 2), maxcount:"", count:""}];
                _loc_2 = 0;
                while (_loc_2 < this.appArr.length)
                {
                    
                    _loc_3 = new Object();
                    _loc_3.index = _loc_2;
                    _loc_4 = this.appArr[_loc_2] >> 16 & 15;
                    _loc_5 = this.appArr[_loc_2] & 65535;
                    _loc_3.name = this.getName(_loc_4);
                    _loc_3.lock = false;
                    _loc_3.type = _loc_4;
                    _loc_3.count = _loc_5;
                    _loc_6 = this.objValue.level;
                    _loc_7 = int(this.cfgJianDing[_loc_6].value / this.jiandingArr[_loc_4]);
                    _loc_3.num = _loc_5 / _loc_7;
                    _loc_8 = this.appArr[_loc_2] >> 20;
                    _loc_3.maxcount = _loc_8;
                    this.appraisalArr1[_loc_2] = _loc_3;
                    _loc_2++;
                }
                slist.array = this.appraisalArr1;
                slist.renderHandler = new Handler(this.slistRender);
                slist.visible = true;
                btn_jd.visible = false;
                btn_jdsure.visible = true;
                btn_jdcancel.visible = true;
            }
            return;
        }// end function

        private function slistRender(param1:Component, param2:int) : void
        {
            var _loc_3:Object = null;
            var _loc_4:Label = null;
            var _loc_5:Label = null;
            var _loc_6:Label = null;
            var _loc_7:Image = null;
            if (param2 < slist.length)
            {
                _loc_3 = slist.array[param2];
                _loc_4 = param1.getChildByName("name") as Label;
                _loc_5 = param1.getChildByName("count") as Label;
                _loc_6 = param1.getChildByName("maxcount") as Label;
                _loc_6.isHtml = true;
                _loc_7 = param1.getChildByName("img") as Image;
                _loc_7.url = "";
                _loc_4.text = _loc_3.name;
                _loc_6.text = this.getStar(_loc_3.maxcount);
                if (int(_loc_3.count) > 0)
                {
                    if (_loc_3.type == 7)
                    {
                        _loc_5.text = String(_loc_3.count / 100) + "%";
                    }
                    else
                    {
                        _loc_5.text = _loc_3.count;
                    }
                }
                else
                {
                    _loc_5.text = "";
                }
                if (this.appraisalArr)
                {
                    if (this.appraisalArr[param2])
                    {
                        if (this.appraisalArr[param2].num > _loc_3.num)
                        {
                            _loc_7.url = "png.tales.down";
                        }
                        else if (this.appraisalArr[param2].num < _loc_3.num)
                        {
                            _loc_7.url = "png.tales.up";
                        }
                        else
                        {
                            _loc_7.url = "";
                        }
                    }
                }
            }
            return;
        }// end function

        private function getStar(param1:int) : String
        {
            var _loc_2:String = "";
            switch(param1)
            {
                case 1:
                case 2:
                case 3:
                {
                    _loc_2 = MColor.getHMTL(param1 + "星", 1);
                    break;
                }
                case 4:
                case 5:
                {
                    _loc_2 = MColor.getHMTL(param1 + "星", 7);
                    break;
                }
                case 6:
                case 7:
                {
                    _loc_2 = MColor.getHMTL(param1 + "星", 4);
                    break;
                }
                case 8:
                case 9:
                {
                    _loc_2 = MColor.getHMTL(param1 + "星", 19);
                    break;
                }
                case 10:
                {
                    _loc_2 = MColor.getHMTL(param1 + "星", 11);
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return _loc_2;
        }// end function

        public function updateArm() : void
        {
            var _loc_5:Object = null;
            var _loc_1:* = UserData.getBagData();
            this._armArray.splice(0, this._armArray.length);
            this._armOnArray.splice(0, this._armOnArray.length);
            var _loc_2:* = _loc_1.maxcount;
            var _loc_3:int = 1;
            while (_loc_3 <= _loc_2)
            {
                
                _loc_5 = _loc_1[_loc_3];
                if (_loc_5 && _loc_5[2] == 1 && _loc_5[4].cls < 10)
                {
                    this._armArray.push(_loc_5[4]);
                }
                _loc_3++;
            }
            var _loc_4:* = ModelProxy.getValue("data", "arms");
            _loc_3 = 1;
            while (_loc_3 <= 14)
            {
                
                if (_loc_4[_loc_3] && _loc_4[_loc_3].cls < 10)
                {
                    this._armOnArray.push(_loc_4[_loc_3]);
                }
                _loc_3++;
            }
            if (this.mlist)
            {
                this.changeData(this.objValue);
            }
            return;
        }// end function

        private function getName(param1:int) : String
        {
            var _loc_2:String = "";
            switch(param1)
            {
                case 1:
                {
                    _loc_2 = "攻击上限:";
                    break;
                }
                case 2:
                {
                    _loc_2 = "攻击下限:";
                    break;
                }
                case 3:
                {
                    _loc_2 = "物防上限:";
                    break;
                }
                case 4:
                {
                    _loc_2 = "物防下限:";
                    break;
                }
                case 5:
                {
                    _loc_2 = "魔防上限:";
                    break;
                }
                case 6:
                {
                    _loc_2 = "魔防下限:";
                    break;
                }
                case 7:
                {
                    _loc_2 = "生命加成:";
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return _loc_2;
        }// end function

        private function blistRender(param1:Component, param2:int) : void
        {
            var _loc_3:Object = null;
            var _loc_4:Label = null;
            var _loc_5:Label = null;
            var _loc_6:Label = null;
            var _loc_7:CheckBox = null;
            var _loc_8:Panel = null;
            var _loc_9:XMLMovieClip = null;
            if (param2 < nlist.length)
            {
                _loc_3 = nlist.array[param2];
                _loc_4 = param1.getChildByName("name") as Label;
                _loc_5 = param1.getChildByName("count") as Label;
                _loc_6 = param1.getChildByName("maxcount") as Label;
                _loc_6.isHtml = true;
                _loc_7 = param1.getChildByName("lock") as CheckBox;
                _loc_8 = param1.getChildByName("panel") as Panel;
                _loc_8.mouseEnabled = false;
                _loc_8.mouseChildren = false;
                while (_loc_8.numChildren > 0)
                {
                    
                    _loc_8.removeChildAt(0);
                }
                _loc_9 = new XMLMovieClip("png.suoEffect", this._xml1);
                _loc_9.x = 1;
                _loc_9.y = -2;
                _loc_9.mouseEnabled = false;
                _loc_9.interval = 1000 / 6;
                _loc_9.play();
                _loc_8.addChild(_loc_9);
                _loc_7.selected = !_loc_3.lock;
                _loc_7.visible = int(_loc_3.count) > 0;
                _loc_4.text = _loc_3.name;
                _loc_6.text = this.getStar(_loc_3.maxcount);
                if (int(_loc_3.count) > 0)
                {
                    if (_loc_3.type == 7)
                    {
                        _loc_5.text = String(_loc_3.count / 100) + "%";
                    }
                    else
                    {
                        _loc_5.text = _loc_3.count;
                    }
                }
                else
                {
                    _loc_5.text = "";
                }
                if (_loc_7.visible && _loc_7.selected && _loc_3.maxcount >= 8)
                {
                    _loc_9.visible = true;
                }
                else
                {
                    _loc_9.visible = false;
                }
                _loc_7.clickHandler = new Handler(this.lockHandler, [_loc_7, param2, _loc_3.maxcount, _loc_9]);
            }
            return;
        }// end function

        protected function lockHandler(param1:Component, param2:int, param3:int, param4:XMLMovieClip) : void
        {
            this.lockArr.setAll(this.lock);
            this.lockArr.setValue(param2, !(param1 as CheckBox).selected);
            this.lock = this.lockArr.getKey();
            if (param1.visible && (param1 as CheckBox).selected && param3 >= 8)
            {
                param4.visible = true;
            }
            else
            {
                param4.visible = false;
            }
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            while (_loc_6 < this.appraisalArr.length)
            {
                
                if (this.lockArr.getValue(_loc_6))
                {
                    _loc_5++;
                }
                _loc_6++;
            }
            var _loc_7:* = Math.pow(2, _loc_5);
            this.needCount = _loc_7;
            this.choseHandler2();
            return;
        }// end function

        private function showJdfText(param1:int, param2:int) : void
        {
            var _loc_3:* = ItemUilt.getAllCount(241102011);
            var _loc_4:* = ConfigDictionary.data.storeNew;
            var _loc_5:* = ConfigDictionary.data.storeNew[20].price;
            if (chejd2.selected)
            {
                jdftx1.text = "消耗鉴定石：" + MColor.getHMTL("" + String(param1 * 2), 16);
                jdtx1.text = "消耗金币：:" + MColor.getHMTL("" + String(param2 * 2), 16);
                if (chejd.selected)
                {
                    jdftx3.text = "消耗元宝：" + String((param1 * 2 - _loc_3) * _loc_5);
                }
            }
            else
            {
                jdftx1.text = "消耗鉴定石：" + MColor.getHMTL("" + String(this.needCount), 16);
                jdtx1.text = "消耗金币：:" + MColor.getHMTL("" + String(this.needJinbi), 16);
            }
            if (!chejd.selected && !chejd2.selected)
            {
                jdftx3.text = "消耗元宝：0";
            }
            else if (chejd.selected && !chejd2.selected)
            {
                jdftx3.text = "消耗元宝：" + String((param1 - _loc_3) * _loc_5);
            }
            return;
        }// end function

    }
}
